﻿using System;
using Obsady;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTestObsady
{
    [TestClass]
    public class MatchTests
    {
        private CMatch match;

        [TestInitialize]
        public void TestFixtureSetup()
        {
            match = new CMatch("Rozg", "1", "17.08.2013", "18.00", "Leszno", "Trapez", "Polonia",
               "Obra", "Nowak", "Lutomski", "Pinkosz", "Zielony", "Linke", "Woźna");
        }

        [TestCleanup]
        public void TestCleanup()
        {
        }

        [TestMethod]
        public void constructOK()
        {
            Assert.AreEqual(6, match._referees.Count);
        }

        [TestMethod]
        public void getName()
        {         
            string location = match.getLocation();
            Assert.AreEqual("Leszno, Trapez ", location);            
        }

        [TestMethod]
        public void getTitle()
        {
            string location = match.getTitle();
            Assert.AreEqual("Rozg 1, Polonia - Obra ", location);
        }

        [TestMethod]
        public void getContent()
        {
            string location = match.getContent();
            Assert.AreEqual("Rozg 1, Polonia - Obra Leszno, Trapez \nBOISKO: Nowak Lutomski \nSTOLIK: Pinkosz Zielony Linke Woźna ", location);            
        }


    }
}
